/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upc.sma.agents;

import com.springrts.ai.oo.Map;
import com.springrts.ai.oo.Resource;

/**
 * This class encapsulates useful map information
 * @author xavi
 */
public class MapInfo {
    private Map map;
    private float gravity, tidalStrength, maxWind, maxMetal, MetalextractorRadius;

    public MapInfo(Map map, Resource metal) {
        gravity = map.getGravity();
        tidalStrength = map.getTidalStrength();
        maxWind = map.getMaxWind();
        maxMetal = map.getMaxResource(metal);
        MetalextractorRadius = map.getExtractorRadius(metal);
    }

    public float getMetalextractorRadius() {
        return MetalextractorRadius;
    }

    public float getGravity() {
        return gravity;
    }

    public Map getMap() {
        return map;
    }

    public float getMaxMetal() {
        return maxMetal;
    }

    public float getMaxWind() {
        return maxWind;
    }

    public float getTidalStrength() {
        return tidalStrength;
    }
    
    /**
     * Gets the elevation of the map at position (x, z)
     * @param x
     * @param z
     * @return y
     */
    public float getElevationAt(float x, float z){
        return map.getElevationAt(x, z);
    }

}
